package edu.chen.service;

import edu.chen.bean.Product;
import edu.chen.service.impl.ProductServiceImplByJdbc;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;

public class Test {
    public static void main(String[] args) {
        ApplicationContext applicationContext =new ClassPathXmlApplicationContext("applicationContext.xml");
        ProductServiceImplByJdbc productServiceImplByJdbc =
                applicationContext.getBean("productServiceImplByJdbc",ProductServiceImplByJdbc.class);
        System.out.println(productServiceImplByJdbc.save(new Product(0,"Java",10.10)));
    }
}
